package com.qinggeng.project.api.dto;

import com.qinggeng.framework.aspectj.lang.annotation.Excel;
import com.qinggeng.project.system.domain.GoodsActivity;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author 吴鹏飞
 * @date 2020/9/4
 */
@Data
public class GoodsActivityDto {
    /**
     *活动ID
     */
    private Long activityId;
    /**
     *活动名称
     */

    private String activityName;

    /**
     *活动图
     */

    private String activityImage;

    /**
     * 活动图标
     */
    private String activityIcon;

    /**
     *活动类型 10=拼团活动
     */

    private String activityType;

    /**
     *活动内容
     */

    private String activityContent;

    /**
     *商品ID
     */
    private Long goodsId;

    /**
     * h5跳转Url
     */
    private String returnUrl;

    /**
     * 创建时间
     */
    private Date createTime;


    //goodsActivity转为GoodsActivityDto
    public static GoodsActivityDto getGoodsActivityDto(GoodsActivity goodsActivity){
        GoodsActivityDto goodsActivityDto = new GoodsActivityDto();
        goodsActivityDto.setActivityId(goodsActivity.getActivityId());
        goodsActivityDto.setActivityName(goodsActivity.getActivityName());
        goodsActivityDto.setActivityIcon(goodsActivity.getActivityIcon());
        goodsActivityDto.setActivityImage(goodsActivity.getActivityImage());
        goodsActivityDto.setActivityType(goodsActivity.getActivityType());
        goodsActivityDto.setActivityContent(goodsActivity.getActivityContent());
        goodsActivityDto.setGoodsId(goodsActivity.getGoodsId());
        goodsActivityDto.setReturnUrl(goodsActivity.getReturnUrl());
        goodsActivityDto.setCreateTime(goodsActivity.getCreateTime());

        return goodsActivityDto;
    }

}
